package com.xysoft.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Problem extends DataEntityImpl {
	//题号
	private String number;
	//标题
	private String title;
	//描述
	private String description;
	//输入
	private String input;
	//输出
	private String output;
	//输入样例
	private String sampleInput;
	//输出样例
	private String sampleOutput;
	//提示
	private String hint;
	//来源
	private String source;
	//标准程序
	private String standardProgram;
	//时间限制
	private int timeLimit;
	//内存限制
	private int memoryLimit;
	//作者
	private String author;
	//难易度
	private int difficulty;
	//通过次数
	private int ac;
	//提交次数
	private int submit;
	//当前状态(1.已发布；2.未发布； 3.无数据)
	private int state;
	//最后通过时间
	private Date acDate;
	//创建时间
	private Date createDate;
	//更新时间
	private Date updateDate;
	//创建者
	private User user;
	//发布范围(0.全局共享；1.范围内共享)
	private int belong;
	//分类
	private SystemType classify;
	//备注
	private String remark;
	//所属组织
	private Organization organization;
	//判定方式
	private boolean auto;
	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getInput() {
		return input;
	}
	public void setInput(String input) {
		this.input = input;
	}
	public String getOutput() {
		return output;
	}
	public void setOutput(String output) {
		this.output = output;
	}
	public String getSampleInput() {
		return sampleInput;
	}
	public void setSampleInput(String sampleInput) {
		this.sampleInput = sampleInput;
	}
	public String getSampleOutput() {
		return sampleOutput;
	}
	public void setSampleOutput(String sampleOutput) {
		this.sampleOutput = sampleOutput;
	}
	public String getHint() {
		return hint;
	}
	public void setHint(String hint) {
		this.hint = hint;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public String getStandardProgram() {
		return standardProgram;
	}
	public void setStandardProgram(String standardProgram) {
		this.standardProgram = standardProgram;
	}
	public int getTimeLimit() {
		return timeLimit;
	}
	public void setTimeLimit(int timeLimit) {
		this.timeLimit = timeLimit;
	}
	public int getMemoryLimit() {
		return memoryLimit;
	}
	public void setMemoryLimit(int memoryLimit) {
		this.memoryLimit = memoryLimit;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public int getDifficulty() {
		return difficulty;
	}
	public void setDifficulty(int difficulty) {
		this.difficulty = difficulty;
	}
	public int getAc() {
		return ac;
	}
	public void setAc(int ac) {
		this.ac = ac;
	}
	public int getSubmit() {
		return submit;
	}
	public void setSubmit(int submit) {
		this.submit = submit;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public Date getAcDate() {
		return acDate;
	}
	public void setAcDate(Date acDate) {
		this.acDate = acDate;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userID")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public int getBelong() {
		return belong;
	}
	public void setBelong(int belong) {
		this.belong = belong;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "classifyID")
	public SystemType getClassify() {
		return classify;
	}
	public void setClassify(SystemType classify) {
		this.classify = classify;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "organizationID")
	public Organization getOrganization() {
		return organization;
	}
	public void setOrganization(Organization organization) {
		this.organization = organization;
	}
	public boolean isAuto() {
		return auto;
	}
	public void setAuto(boolean auto) {
		this.auto = auto;
	}
}
